<template>
    <div>
      <div class="headerBar">
        <div v-if="showBack" @click="back">
          <img src="../../static/img/back.png" alt="">
        </div>
        <img src="../../static/img/logo/logo.png" alt="">
      </div>
    </div>
</template>

<script>
    export default {
      data(){
        return {}
      },
      props: {
        showBack: {
          type: Boolean,
          default: true
        },
      },
      methods:{
        //返回
        back:function(){
          window.history.back();
        }
      }
    }
</script>

<style lang="less" scoped>
  @import "../style/var.less";
  .headerBar{
    .full-w;
    .flex;
    .relative;
    justify-content: center;
    align-items: center;
    height: 0.9rem;
    background: #ffffff;
    div{
      .absolute;
      top: 0.28rem;
      width: 0.22rem;
      height: 0.36rem;
      left:0.54rem;
      &>img{
        .full;
      }
    }
    &>img{
      width: 1.7rem;
      height: 0.36rem;
    }
  }
</style>
